package cn.eveo.refreshandloadmore;

import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentTransaction;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;

import cn.eveo.refreshandloadmore.fragment.GridFragment;
import cn.eveo.refreshandloadmore.fragment.ListFragment;
import cn.eveo.refreshandloadmore.fragment.RecyclerFragment;

public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        FragmentManager fragmentManager = getSupportFragmentManager();
        FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();

        GridFragment gridFragment = new GridFragment();
//        ListFragment listFragment = new ListFragment();
//        RecyclerFragment recyclerFragment = new RecyclerFragment();
        fragmentTransaction.add(R.id.fragment, gridFragment);
//        fragmentTransaction.add(R.id.fragment, listFragment);
//        fragmentTransaction.add(R.id.fragment, recyclerFragment);

        fragmentTransaction.commit();
    }
}
